package com.demo.dao;

import java.util.List;

import com.demo.entity.SalePerson;
import com.demo.vo.SalePersonVo;

public interface ISalePersonDao {
    int deleteByPrimaryKey(Integer id);

    int insert(SalePerson record);

    int insertSelective(SalePerson record);

    SalePerson selectByPrimaryKey(Integer id);
    SalePerson selectByPhone(SalePerson user);

    int updateByPrimaryKeySelective(SalePerson record);

    int updateByPrimaryKey(SalePerson record);
    List<SalePerson> queryByPage(SalePersonVo user);
    List<SalePerson> queryByUserIdAndPage(SalePersonVo user);
    int queryCount(SalePersonVo user);

    /***
     * 销售交易额数量
     * @param user
     * @return
     */
    int querySaleCashCount(SalePersonVo user);

    /**
     * 销售交易额分页
     * @param user
     * @return
     */
    List<SalePersonVo> querySaleCashByPage(SalePersonVo user);
    SalePerson selectByOpenId(String openid);
    /**
     * 销售经理分页查询
     * @param sp
     * @return
     */
    List<SalePerson> querySaleManager(SalePersonVo sp);
    int querySaleManagerCount(SalePersonVo sp);
}